package util;

import java.io.*;

public class uploadzp {
    public void upload(File file, String path) {
        InputStream is;
        try {
            is = new FileInputStream(file);
            OutputStream os = new FileOutputStream(path);
            byte buffer[] = new byte[1024];
            int count = 0;
            while ((count = is.read(buffer)) > 0) {
                os.write(buffer, 0, count);
            }
            os.close();
            is.close();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
